﻿@model PetaPoco.Page<ZhongheCms.Models.GswViewMemberTime>
@{
    Layout = "~/Views/Shared/_Layout.cshtml";
    string mysel = "";
    string myfcss = "";
    string mylcss = "";
    string mycss = "";
    if (Model.CurrentPage == 1)
    {
        myfcss = "disabled";
    }
    var fp = Model.CurrentPage - 1;
    if (ViewBag.pageIndex == Model.TotalPages)
    {
        mylcss = "disabled";
    }
    var np = Model.CurrentPage + 1;
}

<div class="row">
    <div class="col-xs-12 padding-0">
        <div class="widget-box">
            <div class=" widget-header widget-header-flat" style="padding-left: 0px">

                <div class="widget-toolbar">
                    <form name="thisform" method="post" class="form-search" action="/MemberInfo/WorkTime/0?m=@ViewBag.m&f=@ViewBag.f&p=@ViewBag.p&fid=@ViewBag.fid">
                        <label>
                            时间段:&nbsp;<select id="wt" name="wt">
                                <option value="">请选择</option>
                                @if (!string.IsNullOrEmpty(ViewBag.wt))
                                {
                                    <option value="@ViewBag.wt">@ViewBag.wt</option>     
                                }
                                <option value="08：00-10：00">8：00-10：00</option>
                                <option value="10：00-12：00">10：00-12：00</option>
                                <option value="12：00-14：00">12：00-14：00</option>
                                <option value="14：00-18：00">14：00-18：00</option>
                                <option value="18：00—20：00">18：00—20：00</option>
                            </select>
                        </label>

                        <label>
                             日期:&nbsp;<select id="wd" name="wd">
                                <option value="">请选择</option>
                                @if (!string.IsNullOrEmpty(ViewBag.wd))
                                {
                                    <option value="@ViewBag.wd">@ViewBag.wdn</option>     
                                }

                                <option value="D1">星期一</option>
                                <option value="D2">星期二</option>
                                <option value="D3">星期三</option>
                                <option value="D4">星期四</option>
                                <option value="D5">星期五</option>
                                <option value="D6">星期六</option>
                                <option value="D7">星期日</option>
                            </select>
                        </label>

                        <label>
                            <button type="submit" class="btn btn-xs btn-toolbar pull-right">
                                &nbsp;&nbsp; <i class="fa fa-search"></i><span class="bigger-110">搜索</span> &nbsp;&nbsp;
                            </button>
                        </label>
                    </form>
                </div>

            </div>
            <div class="widget-body">
                <div class="widget-main padding-2">

                    <table class="table table-striped table-bordered table-hover">
                        <tr>

                           
                            <th>会员类别</th>
                            <th>会员姓名</th>
                          
                            <th>性别</th>
                            <th>联系电话</th>
                            <th>QQ</th>
                            <th>时间</th>
                            <th>星期一
                            </th>
                            <th>星期二
                            </th>
                            <th>星期三
                            </th>
                            <th>星期四
                            </th>
                            <th>星期五
                            </th>
                            <th>星期六
                            </th>
                            <th>星期日
                            </th>
                             <th>更新日期
                            </th>
                        </tr>
                        <tbody>
                            @foreach (var item in Model.Items)
                            {
                                
                                <tr>
                                    


                                   
                                    <td>
                                        @item.MemberType
                                    </td>
                                     <td>
                                       <a href="/MemberInfo/MemberBrowse/@item.MemberId" target="_blank">  @item.MemberName </a>
                                    </td>
                                    
                                    
                                   
                                    <td>
                                        @item.Gender
                                    </td>
                                    <td>
                                        @item.MemberTel
                                    </td>
                                    <td>
                                        @item.MemberQQ
                                    </td>
                                    <td>
                                       @item.WorkTime

                                    </td>
                                    <td>
                                       @if (item.D1 > 0)
                                       {
                                           <span>有</span>
                                       }

                                    </td>
                                    <td>
                                        @if (item.D2 > 0)
                                        {
                                           <span>有</span>
                                        }

                                    </td>
                                    <td>
                                        @if (item.D3 > 0)
                                        {
                                            <span>有</span>
                                        }

                                    </td>
                                    <td>
                                        @if (item.D4 > 0)
                                        {
                                            <span>有</span>
                                        }

                                    </td>
                                    <td>
                                        @if (item.D5 > 0)
                                        {
                                            <span>有</span>
                                        }

                                    </td>
                                    <td>
                                        @if (item.D6 > 0)
                                        {
                                            <span>有</span>
                                        }

                                    </td>
                                    <td>
                                        @if (item.D7 > 0)
                                        {
                                            <span>有</span>
                                        }

                                    </td>
                                    <td>
                                      @item.LastDate.ToShortDateString()

                                    </td>
                                </tr>
                                       
                            }
                        </tbody>
                    </table>

                </div>
                @if (Model.TotalPages > 1)
                {
                    <div class="modal-footer no-margin-top">
                        <button class="btn btn-sm btn-danger pull-left" data-dismiss="modal">
                            共 @Model.TotalItems 条记录
                        </button>

                        <ul class="pagination pull-right no-margin">
                            <li class="prev @myfcss">
                                <a href="/MemberInfo/WorkTime/0?m=@ViewBag.m&f=@ViewBag.f&p=@ViewBag.p&fid=@ViewBag.fid&wt=@ViewBag.wt&wd=@ViewBag.wd&pageIndex=@fp">
                                    <i class="fa fa-angle-double-left"></i>
                                </a>
                            </li>
                            @for (int i = 1; i <= Model.TotalPages; i++)
                            {
                                mycss = "";
                                if (i == ViewBag.pageIndex)
                                {
                                    mycss = "active";
                                }
                                <li class="@mycss"><a href="/MemberInfo/WorkTime/0?m=@ViewBag.m&f=@ViewBag.f&p=@ViewBag.p&fid=@ViewBag.fid&wt=@ViewBag.wt&wd=@ViewBag.wd&pageIndex=@i">@i</a></li>


                            }



                            <li class="next @mylcss">
                                <a href="/MemberInfo/WorkTime/0?m=@ViewBag.m&f=@ViewBag.f&p=@ViewBag.p&fid=@ViewBag.fid&wt=@ViewBag.wt&wd=@ViewBag.wd&pageIndex=@np">
                                    <i class="fa fa-angle-double-right"></i>
                                </a>
                            </li>
                        </ul>
                    </div>
                }
            </div>
        </div>
    </div>
</div>
